﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using DAO;
using DTO;

namespace BUS
{
    public class BanHangBUS
    {
        BanHangDAO bhDAO = new BanHangDAO();
        public void ThemDonDatHang(BanHangDTO bhDTO)
        {
           
            bhDAO.ThemDonDatHang(bhDTO);
        }
        public void ThemChiTietHoaDon(ChiTietHoaDonDTO cthdDTO)
        {
            bhDAO.ThemChiTietHoaDon(cthdDTO);
        }
        public int LayMaDatHang()
        {
            return bhDAO.LayMaDatHang();
        }
        public int CapNhatSoLuongHoa(int maHoa, int soLuongBan)
        {
            return bhDAO.CapNhatSoLuongHoa(maHoa,soLuongBan);
        }
        public static DataTable TimKKiemHoaDon(string ngayDat, string tenKhachHang)
        {
            return BanHangDAO.TimKKiemHoaDon(ngayDat, tenKhachHang);
        }
    }
}
